Page({
  data: {
    activeTab: 0
  },

  switchTab: function (e) {
    this.setData({
      activeTab: parseInt(e.currentTarget.dataset.index)
    });
  }
});